/** 该文件仅存放演员模块相关的接口API */
import myaxios from "../MyAxios";
// 引入路径前缀
import BASEURL from "../BaseUrl";
const { MACURL } = BASEURL;

const productApi = {
  // 查询全部
  queryAll() {
    return myaxios.get(MACURL + "/product");
  },
  // pid查询// 通过leixing查询
  queryById(params) {
    return myaxios.get(MACURL + "/product/query", params);
  },
  queryByleixing(params) {
    return myaxios.get(MACURL + "/product/leixing", params);
  },
  queryAllByName(params) {
    return myaxios.post(MACURL + "/product/name", params);
  },
  queryAllByNameAndleixing(params, leixing) {
    return myaxios.post(MACURL + "/product/leixing_name", params);
  },
  add(params) {
    return myaxios.post(MACURL + "/product/add", params);
  },
  delete(params) {
    return myaxios.post(MACURL + "/product/del", params);
  },
  update(params) {
    return myaxios.post(MACURL + "/product/put", params);
  },
};

export default productApi;
